<input type="hidden" name="approvalStatusYD" id="approvalStatusYD" value="{{approvalStatus}}"/>
<input type="hidden" name="belongIdYD" id="belongIdYD" value="{{belongId}}"/>
<!--表单头展示信息-->
<!--未提交-->
{{if approvalStatus == 0}}
    <div class="wait_approval">
        <span>待提交</span>
    <div style="display:none;">sss</div>
<!--撤回-->
{{else if approvalStatus == 4}}
    <div class="recall_approval">
        <span>
            <span>{{object.approvalTime}} {{'APPROVAL_BE_CANCEL' | i18n}}</span>
        </span>
        <a _id="approval_process_list" href="javascript:void(0);" class="check_process">{{'APPROVAL_VIEW_PROCESS' | i18n}}</a>
    <div style="display:none;">sss</div>
<!--审批中-->
{{else if approvalStatus == 1}}
    {{if isCounterSigner == "1"}}
        <div class="wait_approval">
            <span>{{'APPROVAL_WAIT' | i18n}}
            {{each currentApprovalList as currentApproval i}}
            <a href="/final/user.action?uid={{users[currentApproval.approvalUserId].id}}" target="_blank">{{users[currentApproval.approvalUserId].name}}</a>
            {{/each}}
            会签</span>
            <a _id="approval_process_list" href="javascript:void(0);" class="check_process">{{'APPROVAL_VIEW_PROCESS' | i18n}}</a>
            <div style="display:none;">sss</div>
    {{else}}
        {{if currentApproval != 0}}
            <div class="wait_approval">
                <span>{{'APPROVAL_WAIT' | i18n}} <a href="/final/user.action?uid={{users[currentApproval].id}}" target="_blank">{{users[currentApproval].name}}</a> {{'APPROVAL' | i18n}}</span>
                <a _id="approval_process_list" href="javascript:void(0);" class="check_process">{{'APPROVAL_VIEW_PROCESS' | i18n}}</a>
            <div style="display:none;">sss</div>
        {{/if}}
    {{/if}}
<!--审批通过-->
{{else if approvalStatus == 3}}
    <div class="pass_approval">
        <span>
            <span>{{object.approvalTime}} {{'APPROVAL_PASS' | i18n}}{{'APPROVAL' | i18n}}</span>
        </span>
        <a _id="approval_process_list" href="javascript:void(0);" class="check_process">{{'APPROVAL_VIEW_PROCESS' | i18n}}</a>
    <div style="display:none;">sss</div>
<!--拒绝-->
{{else if approvalStatus == 2}}
    {{if isCounterSigner == "1"}}
        <div class="recall_approval">
            <span>
                <span>{{object.approvalTime}} {{'APPROVAL_BE' | i18n}} </span>
                {{each currentApprovalList as currentApproval i}}
                <a href="/final/user.action?uid={{users[currentApproval.approvalUserId].id}}" target="_blank">{{users[currentApproval.approvalUserId].name}}</a>
                {{/each}}
                <span>{{'APPROVAL_COUNTERSIGN_TOGETHER' | i18n}} {{'APPROVAL_REJECT' | i18n}}</span>
            </span>

            <a _id="approval_process_list" href="javascript:void(0);" class="check_process">{{'APPROVAL_VIEW_PROCESS' | i18n}}</a>
            {{each currentApprovalList as currentApproval i}}
                {{if currentApproval.result == "0"}}
                    <p class="reject">
                        <span>{{users[currentApproval.approvalUserId].name}}</span>
                        <span class="red-font">{{'APPROVAL_REJECT_REASON' | i18n}}: </span>
                        <span>{{currentApproval.opinion}}</span>
                    </p>
                {{/if}}
            {{/each}}
    {{else}}
        {{if currentApproval != 0}}
            <div class="recall_approval">
                <span>
                    <span>{{object.approvalTime}} {{'APPROVAL_BE' | i18n}} </span><a href="/final/user.action?uid={{users[currentApproval].id}}" target="_blank">{{users[currentApproval].name}}</a><span> {{'APPROVAL_REJECT' | i18n}}</span>
                </span>
                <a _id="approval_process_list" href="javascript:void(0);" class="check_process">{{'APPROVAL_VIEW_PROCESS' | i18n}}</a>
                <p class="reject">
                    <span class="red-font">{{'APPROVAL_REJECT_REASON' | i18n}}: </span>
                    <span>{{opinion}}</span>
                </p>
        {{/if}}
    {{/if}}
{{/if}}





<!-- 审批历史-->
<div style="display:none;" _id="approval_process_list" class="approval_wrap">
    <div class="drop_div approval_process_list">
        <div class="approval_list_inner">
            <ul class="approval_ul">
                {{each processList.approvals as approval i}}
                    {{if processList.approvals.length == i + 1}}
                        <li class="last_li">
                    {{else}}
                        <li>
                    {{/if}}
                    {{if approval.signApprovals.length > 0}}
                        <div class="submit_time">
                            {{if approval.operateType == 6 || approval.operateType == 7}}
                                <span class="passed_approval"></span>
                            {{else if approval.operateType == 4 || approval.operateType == 5}}
                                <span class="reject_approval"></span>
                            {{else}}
                                <span class="awaiting_approval"></span>
                            {{/if}}
                            <span class="passed_time">
                                {{if approval.activityName}}
                                    <span class="passed_person">{{approval.activityName}}</span>
                                {{/if}}
                                {{if approval.operateType}}
                                    {{approval.signApprovals[approval.signApprovals.length - 1].approvalTime}}
                                {{else}}
                                    {{'APPROVAL_RESULT_WAIT_2' | i18n}}
                                {{/if}}
                            </span>
                        </div>
                        <div class="submit_peopel_img">
                            {{each approval.signApprovals as signApproval i}}
                                <a target="_blank" href="/final/user.action?uid={{users[signApproval.id].id}}">
                                    <img src="{{users[signApproval.id].icon}}"/>
                                </a>
                            {{/each}}
                        </div>
                        <div class="submit_peopel">
                            <span class="dblock approval_sing">
                                {{if approval.operateType}}
                                    <span class="dbline-block">{{approval.signApprovals.length}}{{'APPROVAL_PEOPLE_ONLY' | i18n}}{{'APPROVAL_COUNTERSIGN' | i18n}}</span>
                                    {{if approval.operateType == 6}}
                                        <span class="green-font"> {{'APPROVAL_AGREE' | i18n}}</span><span> {{'APPROVAL_THE_APPROVAL' | i18n}}</span>
                                    {{else if approval.operateType == 4}}
                                        <span class="red-font"> {{'APPROVAL_REJECT' | i18n}}</span><span> {{'APPROVAL_THE_APPROVAL' | i18n}}</span>
                                    {{else if approval.operateType == 5}}
                                        <span class="red-font"> {{'APPROVAL_BE' | i18n}}{{'APPROVAL_CANCEL' | i18n}}</span>
                                    {{else if approval.operateType == 7}}
                                        <span class="green-font"> {{'APPROVAL_OPERATE_PASS' | i18n}}</span>
                                    {{/if}}
                                {{else}}
                                    <span class="dbline-block">{{approval.signApprovals.length}}{{'APPROVAL_PEOPLE_ONLY' | i18n}}{{'APPROVAL_SIGN' | i18n}}</span>
                                {{/if}}
                            </span>
                            {{each approval.signApprovals as signApproval i}}
                                <span class="dblock approval_people_opinion">
                                    <a href="/final/user.action?uid={{users[signApproval.id].id}}" target="_blank" ucard="uid={{users[signApproval.id].id}}">{{users[signApproval.id].name}}:</a>
                                    {{if signApproval.result == 1}}
                                        <span class="green-font"> {{'APPROVAL_AGREE' | i18n}}</span>
                                        <span class="time rfloat">{{signApproval.approvalTime}}</span>
                                    {{else if signApproval.result == 0}}
                                        <span class="red-font"> {{'APPROVAL_REJECT' | i18n}}</span>
                                        <span class="time rfloat">{{signApproval.approvalTime}}</span>
                                    {{else if signApproval.result == -1}}
                                        <span class="yellow-font"> {{'APPROVAL_RESULT_WAIT_2' | i18n}}</span>
                                    {{else if signApproval.result == 5}}
                                        <span class="red-font"> {{'APPROVAL_BE' | i18n}}{{'APPROVAL_CANCEL' | i18n}}</span>
                                        <span class="time rfloat">{{signApproval.approvalTime}}</span>
                                    {{/if}}
                                </span>
                                {{if signApproval.opinion}}
                                    <div class="approval_people_wrap">
                                        <div class="approval_people_toparrow">
                                            <div class="approval_people_toparrowinner"></div>
                                        </div>
                                    <div class="approval_people_content">{{signApproval.opinion}}</div>
                                    </div>
                                {{/if}}
                            {{/each}}
                        </div>
                    </li>
                {{else if approval.result == -1}}
                    <div class="submit_time">
                        <span class="awaiting_approval"></span>
                        {{if approvalStatus == 4 || approvalStatus == 2}}
                            <span class="passed_time">
                                {{if approval.activityName}}
                                    <span class="passed_person">{{approval.activityName}}</span>
                                {{/if}}
                                待提交
                            </span>
                        {{else}}
                            <span class="passed_time">
                                {{if approval.activityName}}
                                    <span class="passed_person">{{approval.activityName}}</span>
                                {{/if}}
                                {{'APPROVAL_RESULT_WAIT_2' | i18n}}
                            </span>
                        {{/if}}
                    </div>
                    <div class="submit_peopel_img">
                        <a target="_blank" href="/final/user.action?uid={{users[approval.approvalUserId].id}}">
                            <img src="{{users[approval.approvalUserId].icon}}"/>
                        </a>
                    </div>
                    <div class="submit_peopel">
                        <a href="/final/user.action?uid={{users[approval.approvalUserId].id}}" target="_blank" ucard="uid={{users[approval.approvalUserId].id}}">{{users[approval.approvalUserId].name}}</a>
                        {{if approvalStatus == 4 || approvalStatus == 2}}
                            <span class="yellow-font">待提交</span>
                        {{else}}
                            <span class="yellow-font">{{'APPROVAL_RESULT_WAIT_2' | i18n}}</span>
                        {{/if}}
                    </div>
                </li>
                {{else if approval.result == 3 && approval.operateType == 1}}
                    <div class="submit_time">
                        <span class="passed_approval"></span>
                        <span class="passed_time">
                        <span class="passed_person">{{'SUBMIT' | i18n}}</span>
                        {{approval.approvalTime}}</span>
                    </div>
                    <div class="submit_peopel_img">
                        <a target="_blank" href="/final/user.action?uid={{users[approval.approvalUserId].id}}">
                            <img src="{{users[approval.approvalUserId].icon}}"/>
                        </a>
                    </div>
                    <div class="submit_peopel">
                        <span class="dblock approval_people_opinion">
                            <a href="/final/user.action?uid={{users[approval.approvalUserId].id}}" target="_blank" ucard="uid={{users[approval.approvalUserId].id}}">{{users[approval.approvalUserId].name}}</a>
                            <span> {{'APPROVAL_OPERATE_SUBMIT' | i18n}}</span>
                            {{if approval.opinion}}
                                <div class="approval_people_wrap">
                                    <div class="approval_people_toparrow">
                                        <div class="approval_people_toparrowinner"></div>
                                    </div>
                                    <div class="approval_people_content">{{approval.opinion}}</div>
                                </div>
                            {{/if}}
                        </span>
                    </div>
                </li>
                {{else if approval.result == 1 && approval.operateType==6}}
                    <div class="submit_time">
                        <span class="passed_approval"></span>
                        <span class="passed_time">
                                {{if approval.activityName}}
                                    <span class="passed_person">{{approval.activityName}}</span>
                                {{/if}}
                        {{approval.approvalTime}}</span>
                    </div>
                    <div class="submit_peopel_img">
                        <a target="_blank" href="/final/user.action?uid={{users[approval.approvalUserId].id}}">
                            <img src="{{users[approval.approvalUserId].icon}}"/>
                        </a>
                    </div>
                    <div class="submit_peopel">
                        <span class="dblock approval_people_opinion">
                            <a href="/final/user.action?uid={{users[approval.approvalUserId].id}}" target="_blank" ucard="uid={{users[approval.approvalUserId].id}}">{{users[approval.approvalUserId].name}}</a>
                            <span class="green-font"> {{'APPROVAL_AGREE' | i18n}}</span>
                            <span>{{'APPROVAL_THE_APPROVAL' | i18n}}</span>
                            {{if approval.opinion}}
                                <div class="approval_people_wrap">
                                    <div class="approval_people_toparrow">
                                        <div class="approval_people_toparrowinner"></div>
                                    </div>
                                    <div class="approval_people_content">{{approval.opinion}}</div>
                                </div>
                            {{/if}}
                        </span>
                    </div>
                </li>
                {{else if approval.result == 1 && approval.operateType==7}}
                    <div class="submit_time">
                        <span class="passed_approval"></span>
                        <span class="passed_time">
                                {{if approval.activityName}}
                                    <span class="passed_person">{{approval.activityName}}</span>
                                {{/if}}
                        {{approval.approvalTime}}</span>
                    </div>
                    <div class="submit_peopel_img">
                        <a target="_blank" href="/final/user.action?uid={{users[approval.approvalUserId].id}}">
                            <img src="{{users[approval.approvalUserId].icon}}"/>
                        </a>
                    </div>
                    <div class="submit_peopel">
                        <span class="dblock approval_people_opinion">
                            <a href="/final/user.action?uid={{users[approval.approvalUserId].id}}" target="_blank" ucard="uid={{users[approval.approvalUserId].id}}">{{users[approval.approvalUserId].name}}</a>
                            <span class="green-font"> {{'APPROVAL_OPERATE_PASS' | i18n}}</span>
                            {{if approval.opinion}}
                                <div class="approval_people_wrap">
                                    <div class="approval_people_toparrow">
                                    <div class="approval_people_toparrowinner"></div>
                                </div>
                                <div class="approval_people_content">{{approval.opinion}}</div>
                                </div>
                            {{/if}}
                        </span>
                    </div>
                </li>
                {{else if approval.result == 3 && approval.operateType==3}}
                    <div class="submit_time">
                        <span class="passed_approval"></span>
                        <span class="passed_time">
                        <span class="passed_person">{{'SUBMIT' | i18n}}</span>
                        {{approval.approvalTime}}</span>
                    </div>
                    <div class="submit_peopel_img">
                        <a target="_blank" href="/final/user.action?uid={{users[approval.approvalUserId].id}}">
                            <img src="{{users[approval.approvalUserId].icon}}"/>
                        </a>
                    </div>
                    <div class="submit_peopel">
                        <a href="/final/user.action?uid={{users[approval.approvalUserId].id}}" target="_blank" ucard="uid={{users[approval.approvalUserId].id}}">{{users[approval.approvalUserId].name}}</a>
                        <span> {{'APPROVAL_OPERATE_RESUBMIT' | i18n}}</span>
                    </div>
                </li>
                {{else if approval.operateType==5}}
                    <div class="submit_time">
                        <span class="reject_approval"></span>
                        <span class="passed_time">
                                {{if approval.activityName}}
                                    <span class="passed_person">{{approval.activityName}}</span>
                                {{/if}}
                        {{approval.approvalTime}}</span>
                    </div>
                    <div class="submit_peopel_img">
                        <a target="_blank" href="/final/user.action?uid={{users[approval.approvalUserId].id}}">
                            <img src="{{users[approval.approvalUserId].icon}}"/>
                        </a>
                    </div>
                    <div class="submit_peopel">
                        <a href="/final/user.action?uid={{users[object.createdBy].id}}" target="_blank" ucard="uid={{users[object.createdBy].id}}">{{users[object.createdBy].name}}</a>
                        <span class="red-font"> {{'APPROVAL_OPERATE_CANCEL' | i18n}}</span>
                    </div>
                </li>
                {{else if approval.result == 0}}
                    <div class="submit_time">
                        <span class="reject_approval"></span>
                        <span class="passed_time">
                                {{if approval.activityName}}
                                    <span class="passed_person">{{approval.activityName}}</span>
                                {{/if}}
                        {{approval.approvalTime}}</span>
                    </div>
                    <div class="submit_peopel_img">
                        <a target="_blank" href="/final/user.action?uid={{users[approval.approvalUserId].id}}">
                            <img src="{{users[approval.approvalUserId].icon}}"/>
                        </a>
                    </div>
                    <div class="submit_peopel">
                        <span class="dblock approval_people_opinion">
                            <a href="/final/user.action?uid={{users[approval.approvalUserId].id}}" target="_blank" ucard="uid={{users[approval.approvalUserId].id}}">{{users[approval.approvalUserId].name}}</a>
                            <span class="red-font"> {{'APPROVAL_REJECT' | i18n}}</span>
                            {{if approval.opinion}}
                                <div class="approval_people_wrap">
                                    <div class="approval_people_toparrow">
                                        <div class="approval_people_toparrowinner"></div>
                                    </div>
                                    <div class="approval_people_content">{{approval.opinion}}</div>
                                </div>
                            {{/if}}
                        </span>
                    </div>
                </li>
            {{/if}}
        {{/each}}
 <!--{{each processList.flowSteps as flowStep i}}
    {{if processList.flowSteps.length == i + 1}}
        <li class="last_li">
    {{else}}
<li>
{{/if}}
<div class="submit_time">
    <span class="without_approval"></span>
    <span class="without_people">{{flowStep.name}}</span>
    <span class="without_people">{{'APPROVAL_WITHOUT_BEGIN' | i18n}}</span>
</div>
</li>
{{/each}}-->
    </ul>
</div>
</div>
</div>
</div>


<!-- 审批申请选择下一步审批人等-->
{{if approvalStatus == 1 && currentApproval == currentUserId}}
    <div class="approval_comments">
        <form id="approvalWithCommentForm" class="comment_form_approval" action="/json/crm_approval/deal-approval.action" method="post">
            <input type="hidden" class="approvalResult" name="approvalResult"/>

            <div class="approval_detail clear">
                <div class="approval_detail">
                    <div _id="approvalResultRadio" class="ui-radio-buttonset">
                        <input id="approvalResultRadio1" type="radio" name="approvalResult_radio" value="1" /><label for="approvalResultRadio1">{{'APPROVAL_AGREE' | i18n}}</label>
                        <input id="approvalResultRadio2" type="radio" name="approvalResult_radio" value="0" /><label for="approvalResultRadio2">{{'APPROVAL_REJECT' | i18n}}</label>
                    </div>
                    <span class="span_watermark">
                        <textarea id="commentContent" placeholder="{{'APPROVAL_INPUT_OPINION' | i18n}}" class="comment_editor approval_textarea" name="commentContent" autoComplete="off"></textarea>
                    </span>
                </div>
                {{if object.hasApprovers == "true" || object.allowSelectApprover == "true" || isParallelGateway == 1}}
                    <div class="sp_people approval_people nc_agree_show" style="display: none">
                    <label>{{'APPROVAL_FORWARD' | i18n}}</label>
                    <div class="name_select{{if isParallelGateway == 1}} sign_name_select{{/if}}">
                        {{if isParallelGateway == 0}}
                            <input type="hidden" class="approvalUser_hidden" name="approval.approvalUserId"
                            {{if object.defaultApprover != ""}}
                                value="{{object.defaultApprover.id}}"
                            {{/if}}/>
                            <a id="approverSelectNextA" href="javascript:void(0)" title="{{'APPROVAL_SELECT_NEXT' | i18n}}" class="approval_user nc_show_approval_user">
                                {{if object.defaultApprover != ""}}
                                    {{object.defaultApprover.name}}
                                {{else}}
                                    {{'APPROVAL_SELECT_PEOPLE' | i18n}}
                                {{/if}}
                            </a>

                            <div class="user_select select_depart_list nc_show_approval_user" style="display: none">
                                {{if object.hasApprovers == "true"}}
                                    <div class="group_select_top">
                                        <h5>{{'APPROVAL_SELECT_FROM_QUEUE' | i18n}}：</h5>
                                    </div>
                                    <ul class="group_member selectColleague_ul">
                                        {{each object.approvers as approver i}}
                                            <li class="nc_selectColleague_li" uid="{{approver.id}}" uname="{{approver.name}}">
                                                <a href="javascript:;">
                                                    <img class="userpic" ucard="uid={{approver.id}}" src="{{approver.icon}}"/>
                                                </a>
                                                <p><span>{{approver.name}}</span></p>
                                            </li>
                                        {{/each}}
                                    </ul>
                                {{/if}}

                                {{if object.allowSelectApprover == "true"}}
                                    <div class="user_select_other">
                                        <h5>{{if object.hasApprovers == "true"}}{{'APPROVAL_OR' | i18n}}{{/if}}{{'APPROVAL_INPUT_TO_SELECT' | i18n}}：</h5>
                                        <input id="approvalUserSelect" type="text" class="text" style="width: 100px;"/>
                                        <a id="showApprovalUserA" href="javascript:void(0);">{{'APPROVAL_CONFIRM' | i18n}}</a>
                                    </div>
                                {{/if}}
                            </div>
                        {{else}}
                            {{'APPROVAL_MULTIPEOPLE_COUNTERSIGN' | i18n}}
                        {{/if}}
                    </div>
                    <label>{{'APPROVAL_CONTINUE' | i18n}}</label>
                </div>
                {{/if}}
                <input name="commentSystemId" type="hidden" value="602"/>
                <!--<input name="commentSystemItemId" type="hidden" value="{{object.applyId}}"/>-->
                <input name="objectId" type="hidden" value="{{object.applyId}}"/>
                <input name="belongId" type="hidden" value="{{belongId}}"/>
                <input name="entityTypeId" type="hidden" value="{{entityTypeId}}"/>
                <input name="createdBy" type="hidden" value="{{createdBy}}"/>
                <input name="objectName" type="hidden" value="{{objectName}}"/>
                <input name="isParallelGateway" type="hidden" value="{{isParallelGateway}}"/>
                <input name="isCounterSigner" type="hidden" value="{{isCounterSigner}}"/>
                <input name="taskid" type="hidden" value="{{object.taskid}}"/>
                <div class="approval_people">
                    <a result="1" href="javascript:void(0)" class="green_button agree_btn nc_agree_show" style="display: none">{{'APPROVAL_SUBMIT_3' | i18n}}</a>
                    <a result="0" href="javascript:void(0)" class="green_button reject_btn nc_reject_show" style="display: none;">{{'APPROVAL_SUBMIT_3' | i18n}}</a>
                    <a result="-1" href="javascript:void(0)" class="green_button nc_comment_btn nc_comment_show" style="display: none;">{{'APPROVAL_SUBMIT_3' | i18n}}</a>
                </div>
            </div>
        </form>
    </div>
{{/if}}
